<?php

namespace oa\services;

use Yii;
use oa\models\LogUserVisit;

class LogUserVisitService extends BaseService
{
    /**
     * @param $start_at
     */
    public static function add($start_at, $visit_url)
    {
        $model = new LogUserVisit;
        $model->url = $visit_url;
        $model->exec_msec = floor((microtime(true) - $start_at) * 10000);
        $model->save();
    }
}